package ex8;
import java.util.*;
public class SimpleThread  extends Thread{
	Random rand=new Random();
	   SimpleThread(String threadName){
		   super(threadName);
	   }
	  @Override
	    public void run() {
		  for(int i=0;i<10;i++) {
	    	System.out.println("run method!"+i+" "+this.getName());
	    	try {
	    	//Thread.sleep(1000);//随机休眠时间1~1000秒
	    	Thread.sleep(rand.nextInt(1000));
	    	}catch(Exception e) {
	    		e.printStackTrace();
	    	}
	    	}
	    	System.out.println("Damn"+this.getName());
	    }
	  

	
}
